<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>13值绑定和修饰符</title>
    <style>
        .redBorder{
            border-color: red;
            border-width: 1px;
            border-style: solid;
        }
    </style>
</head>
<body>
<div id="app">
    计算器：{{ counter }}<br>
    <!--复选框利用v-model实现双向绑定，同时绑定控件的值-->
    <input type="checkbox" v-model="checked" v-bind:value="checked">
    <div>{{ checked }}</div>
    <!--摁回车或控件失去焦点触发-->
    <input type="text" v-model.lazy="message">
    <div>{{ message }}</div>
    <!--不加.number用户输入后counter变成string类型-->
    <input type="number" v-model.number="counter">
    <div>{{typeof counter}}</div>
    <!--摁回车或控件失去焦点触发-->
    <input type="text" v-model.trim="message">
    <div>1{{ message }}2</div>
</div>
<script src="../vue.global.3.0.5.js"></script>
<script>
    //声明一个选项对象
    const App={
        //初始数据
        data() {
            return {
                counter: 100,
                message: "Vue3.x",
                checked: ""
            }
        },
        methods: {
            
        },
        computed: {
            compClassName: {
                get() {
                    
                },
                set(value) {

                }
            }
        }
    }

    //全局API对象，创建应用对象返回(选项对象).挂载方法(DOM节点)
    const vm = Vue.createApp(App).mount("#app");
</script>
</body>
</html>